package tds.model2.version2;

import java.math.BigDecimal;

/**
 * 
 * @Company 杭州先锋电子技术股份有限公司
 * @ClassName CashReturn
 * @Description TODO(返利收费 子类)
 * @author tds
 * @Date 2019年1月7日 下午12:00:09
 * @version 1.0.0
 */
public class CashReturn extends CashSuper {

	private BigDecimal conditionMoney;
	
	private BigDecimal returnMoney;
	
	
	public CashReturn(BigDecimal conditionMoney, BigDecimal returnMoney) {
		super();
		this.conditionMoney = conditionMoney;
		this.returnMoney = returnMoney;
	}


	@Override
	public BigDecimal calculateActualMoney(BigDecimal money) {
		if(money.compareTo(conditionMoney) >= 0){
			money = money.add(returnMoney);
		}
		return money;
	}

}
